<?php

namespace app\index\controller;

use app\common\controller\Frontend;

class Settled extends Frontend
{

    protected $noNeedLogin = '*';
    protected $noNeedRight = '*';
    protected $layout = '';

    public function index()
    {
        return $this->view->fetch();
    }

    public function second()
    {
        return $this->view->fetch();
    }

    public function three()
    {
        return $this->view->fetch();
    }

    public function four()
    {
        return $this->view->fetch();
    }

    public function getLocation(){

        $url = 'https://apis.map.qq.com/ws/location/v1/ip?key=GT5BZ-4MDKV-OQEPY-5UHKN-CJKGV-FBFY6';

        $curl = curl_init();
        curl_setopt($curl, CURLOPT_URL, $url);
        curl_setopt($curl, CURLOPT_HEADER, 0);
        curl_setopt($curl, CURLOPT_TIMEOUT, 1);
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
        $data = curl_exec($curl);

        return $data;
    }
}
